//
//  WKFNetwork.h
//  质检
//
//  Created by Mac on 2018/3/28.
//  Copyright © 2018年 158682312@qq.com. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ZXTAPIStatus.h"

@protocol WKFNetworkDelegate <NSObject>

@optional
#pragma mark - NetWork success
//网络请求成功
- (void)networkSuccessWithResponseDic:(NSDictionary *)responseDic networkPath:(NSString *)aNetworkPath statusModel:(ZXTAPIStatus *)status paramsStr:(NSString *)params;
//网络请求成功
- (void)networkSuccessWithRequestDic:(NSDictionary *)requestDic responseDic:(NSDictionary *)responseDic networkPath:(NSString *)aNetworkPath
                         statusModel:(ZXTAPIStatus *)status  paramsStr:(NSString *)params;
#pragma mark - Network error
//网络请求失败
- (void)networkAPIError:(NSDictionary *)responseDic networkPath:(NSString *)aNetworkPath statusModel:(ZXTAPIStatus *)status;
//网络错误
- (void)networkError:(NSError *)error networkPath:(NSString *)aNetworkPath;

@end

@interface WKFNetwork : NSObject

//delegate
@property(nonatomic, assign)id<WKFNetworkDelegate>delegate;
+ (WKFNetwork *)sharedSingleton;

#pragma mark - Network begin
//开始网络请求
- (void)afNetworkBeginWithHost:(NSString *)aHostName path:(NSString *)aPath params:(NSDictionary *)aParams httpMethod:(NSString *)aHttpMethod selectorName:(NSString *)aSelectorName delegate:(id)delegate;
@end
